package com.lanou.dllo.soccernews.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.lanou.dllo.soccernews.fragment.FragmentFactory;


/**
 * Created by dllo on 15/10/21.
 */
public class HomeViewpageAdapter extends FragmentPagerAdapter {

        private String[] titles = {"   头条   ", "   圈子   ", "   集锦   ", "   深度   ", "   足彩   "};

        public HomeViewpageAdapter(FragmentManager fm) {
            super(fm);
        }

        @Override
        public Fragment getItem(int position) {

            return FragmentFactory.createFragment(position);
        }

        @Override
        public int getCount() {
            return titles.length;
        }

        public CharSequence getPageTitle(int position) {

            return titles[position];


        }


}
